package com.ygqh.baby.ao;

import org.apache.commons.lang.StringUtils;

/**
 * @author: sunshuo
 * @date: 2018/12/11 11:37
 */
public enum BillingType {

	/**
	 * 先款后货
	 */
	PaymentFirst(0, "先款后货"),

	/**
	 * 先货后款
	 */
	ShipmentFirst(1, "先货后款");

	private int code;

	private String desc;

	BillingType(int code, String desc) {
		this.code = code;
		this.desc = desc;
	}

	public int getCode() {
		return code;
	}

	public String getDesc() {
		return desc;
	}

	public String getDesc(String name) {
		return StringUtils.isNotBlank(name) ? BillingType.valueOf(name).getDesc() : null;
	}
}
